package com.hjlsoft.aftp.common;

import java.util.ArrayList;
import java.util.List;

public class StringUtil {
	
	public static boolean isEmpty(String s) {
		if (s == null || s.length() == 0) {
			return true;
		}
		return false;
	}
	
	public static List<String> splitTrim(String input, String regex) {
		List<String> ret = new ArrayList<String>();
		String[] parts = input.split(regex);
		for (String part : parts) {
			String trimmedPart = part.trim();
			if (StringUtil.isEmpty(trimmedPart)) {
				continue;
			}
			ret.add(trimmedPart);
		}
		return ret;
	}

}
